﻿using Service;
using System;
using System.Text;

namespace Consumer
{
    class Program
    {
        static void Main(string[] args)
        {
            var queueName = "TRabbitMQ";

            MessageQueue consumer = new MessageQueue("106.55.163.36", 5672, "admin", "qq1226550632");
            var connect = consumer.GetMessage(queueName, (model,ea) =>
             {
                 Console.WriteLine(Encoding.UTF8.GetString(ea.Body.ToArray()));
             });
            Console.ReadLine();
            connect.Close();
        }
    }
}
